package com.crazyread.service;

import com.crazyread.comment.lang.Result;
import com.crazyread.model.domain.Book;
import com.crazyread.model.domain.BookChapter;
import com.crazyread.model.domain.BookType;
import com.crazyread.model.domain.BookType3;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
@Service
public interface BooksService {
    public List<Book> selectByBook();
    public Book selectByIdBook(int id);
    public List<Book> selectByNameBook(String bookname);
    //章节分页
    public PageInfo<BookChapter> selectBookWithPage(Integer page, Integer count);
    public List<BookChapter> selectByChapter();
    public List<BookType> selectByType();
    public BookType selectByIdType(int id);
    public List<BookChapter> selectByIdChapter(int id);
    public Book updateByIdBook(Book book);
    public List<Book> selectRandom();

    public BookType3 selectByIdTypeBook(int id);
    public Result deleteByIdBook(int id);
    public List<Book> selectByRankBook();
    public Book InsertByIdBookRank(int id);

}
